home *** CD-ROM | disk | FTP | other *** search
/ PC World Komputer 2010 April / PCWorld0410.iso / pluginy Firefox / 2410 / 2410.xpi / chrome / content / foxmarks-pwsanitizeoverlay.js < prev    next >
Text File  |  2010-01-28  |  824b  |  29 lines

  1. /*
  2.  Copyright 2007-2008 Foxmarks Inc.
  3.  
  4.  foxmarks-pwsanitizeoverlay.js: component that tells password that it
  5.  needs to check for changes.
  6.  
  7.  */
  8.  
  9. window.addEventListener(
  10.     "unload",
  11.     function(){
  12.         var checklist = document.getElementsByTagName("checkbox");
  13.         var ctr = checklist.length;
  14.         while(ctr--){
  15.             var el = checklist[ctr];
  16.             var prefname = el.getAttribute('preference');
  17.             if(el.checked && prefname=="privacy.item.passwords"){
  18.                 var lm = Date.now();
  19.                 var os = Components.classes["@mozilla.org/observer-service;1"]
  20.                     .getService(Components.interfaces.nsIObserverService);
  21.                 os.notifyObservers(null, "foxmarks-checkforpasswordchange", 
  22.                     lm);
  23.             }
  24.         }
  25.     }, 
  26.     false
  27. );
  28.  
  29.